<%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="org.apache.commons.lang.time.DateFormatUtils"%>
<%@page import="org.springframework.util.CollectionUtils"%>
<%@page import="java.util.Collection"%>
<%@ include file="../common/common_include.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>


<%
	SoftForm form = (SoftForm)request.getAttribute("command");
	String tab = form.getTab();
 	List<TblOaSoftType> fileTypeList = (List<TblOaSoftType>)request.getAttribute("fileTypeList");
	String defaultTypeId = StringUtils.isNotBlank(request.getAttribute("defaultTypeId")+"")?(request.getAttribute("defaultTypeId")+""):"";

%>
			<div class="main">
				<div class="tab softTab" id="softTab">
					<ul>
						<%
							if(!CollectionUtils.isEmpty(fileTypeList)){
								for(TblOaSoftType coreFileType: fileTypeList){
									String type = coreFileType.getTypeId()+"";
									String typeName = coreFileType.getFileType();
									
									if("18".equalsIgnoreCase(type)){
										%>
										<sec:authorize ifAllGranted="BAOJIA_DOWNLOAD">
										<li group="<%=type%>" <%=defaultTypeId.equalsIgnoreCase(type)?"class=focus":""%>>
								    		<a href=javascript:XF.Soft.searchByFileType("<%=type%>")><%=typeName%></a>
								    	</li>
								    	</sec:authorize>
										<%
									}else{
										%>
										<li group="<%=type%>" <%=defaultTypeId.equalsIgnoreCase(type)?"class=focus":""%>>
								    		<a href=javascript:XF.Soft.searchByFileType("<%=type%>")><%=typeName%></a>
								    	</li>
										<%
									}
								}
							}
						%>
					</ul>
				</div>
				<div class="oaTable">
					<div id="replaceDiv"></div>
		    	</div>
	    	</div>

<script type="text/javascript">
	$(function(){
		XF.Soft.searchSoft("<%=defaultTypeId%>");
		XF.NAV.activeTab('"<%=tab%>"');
	});
</script>
